package ClassWork.Work_03.Cart;

import java.util.Scanner;
import java.util.HashMap;
import java.util.Map;
import java.util.ArrayList;
import java.util.List;

public class Main {
    public static void main(String[] args) {
        Map<String,Cart> map = new HashMap<>();
        List<Produce> pro = new ArrayList<>();
        ProduceService.produceService(pro);
        Scanner sc = new Scanner(System.in);
        while(true){
            ProduceService.putProduce(pro);
            CartService.cartService(pro,map);
            System.out.println("是否继续购买？");
            int f = sc.nextInt();
            if(f != 1){
                break;
            }
        }
        CartService.putCart(map);
    }
}
